Python Deep Learning (Python Technologies) by Vishal Gupta
Author:Vishal Gupta [Gupta, Vishal]
Language: eng
Format: azw3, epub
Published: 2020-10-02T00:00:00+00:00
Removing an entire table using Python
You can drop a table whenever you need to, using the DROP statement. But you need to be very careful while deleting any existing table because the data lost will not be recovered after deleting a table.
import psycopg2
#establishing the connection
conn = psycopg2. connect(
database = "mydb" , user = 'postgres' , password = 'password' , host = '127.0.0.1' , port = '5432'
)
#Setting auto commit false
conn. autocommit = True
#Creating a cursor object using the cursor() method
cursor = conn. cursor()
#Doping EMPLOYEE table if already exists
cursor. execute( "DROP TABLE emp" )
print ( "Table dropped... " )
#Commit your changes in the database
conn. commit()
#Closing the connection
conn. close()
Download
Python Deep Learning (Python Technologies) by Vishal Gupta.epub
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Hello! Python by Anthony Briggs(9911)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9794)
The Mikado Method by Ola Ellnestam Daniel Brolund(9775)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8292)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7775)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7758)
Grails in Action by Glen Smith Peter Ledbrook(7693)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7557)
Windows APT Warfare by Sheng-Hao Ma(6779)
Layered Design for Ruby on Rails Applications by Vladimir Dementyev(6505)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6409)
Blueprints Visual Scripting for Unreal Engine 5 - Third Edition by Marcos Romero & Brenden Sewell(6373)
Kotlin in Action by Dmitry Jemerov(5061)
Hands-On Full-Stack Web Development with GraphQL and React by Sebastian Grebe(4314)
Functional Programming in JavaScript by Mantyla Dan(4037)
Solidity Programming Essentials by Ritesh Modi(3975)
WordPress Plugin Development Cookbook by Yannick Lefebvre(3758)
Unity 3D Game Development by Anthony Davis & Travis Baptiste & Russell Craig & Ryan Stunkel(3702)
The Ultimate iOS Interview Playbook by Avi Tsadok(3676)
